<%@ page language="java" import="java.util.*"  pageEncoding="utf-8"  contentType="text/html; charset=UTF-8"%>
<%@ include file="/commons/taglibs.jsp"%>
<%@ include file="/commons/meta.jsp"%>
<%@ include file="/commons/easyUI.jsp" %>
<html>
<head>
	<title>库存管理系统</title>
	<script type="text/javascript" src="./js/action/offices.js"></script>
</head>
<body style="margin:-20px">
	<!-- 使用 javascript 创建数据网格（datagrid） -->
	<table id="offices_table" > 
   
	</table> 
	
	
	<!-- 在 <div> 标签内定义工具栏 -->
	<div id="tb">
		<div>
			<a href="javascript:openAddOfficeDialog()" class="easyui-linkbutton"  data-options="iconCls:'icon-add',plain:true" >登记新购买的办公用品</a>
			<a href="javascript:openUpdateOfficeDialog()" class="easyui-linkbutton"  data-options="iconCls:'icon-edit',plain:true" >添加</a>
		</div>
		<div>
			&nbsp;用品名称：&nbsp;<input type="text"  id="name2"  size="20" onkeydown="if(event.keyCode==13) searchOffice()"/>
			<a href="javascript:searchOffice()" class="easyui-linkbutton"  data-options="iconCls:'icon-search',plain:true" >搜索</a>
		</div>
	</div>
	
	
	<!-- 
	新增记录
	 -->
	<div id="addOfficeDlg" class="easyui-dialog" style="width: 450px;height:200px;padding: 10px 20px" data-options="closed:true,buttons:'#addOfficeDlg-buttons'">
	 	<form id="addOfficeFm" method="post">
	 		<table data-options="cellspacing:8px" >
	 			<tr>
	 				<td>用品名称：</td>
	 				<td><input id="officeName"  class="easyui-textbox"  name="name"  type="text" required="required"  style="width:300px;height:30px;" /></td>
	 			</tr>  
	 			<tr>
	 				<td>库存数量：</td>
	 				<td><input class="easyui-textbox ; easyui-validatebox"  id="count" name="count"  required="required" style="width:300px;height:30px;"/></td>
	 			</tr>
	 			<tr>
	 				<td>用品单位：</td>
	 				<td><input id="officeUnit"  class="easyui-textbox"  name="unit"  type="text" required="required" style="width:300px;height:30px;" /></td>
	 			</tr> 
	 		</table>
	 	</form>
	</div>
	<div id="addOfficeDlg-buttons">
		<a href="javascript:addOffice()" class="easyui-linkbutton"  data-options=" iconCls:'icon-ok'">提交</a>
		<a href="javascript:closeAddOfficeDlg()"  class="easyui-linkbutton"  data-options=" iconCls:'icon-cancel'">取消</a>
	</div>	
	
	<!-- 
	修改记录
	 -->
	<div id="updateOfficeDlg" class="easyui-dialog" style="width: 450px;height:300px;padding: 10px 20px" data-options="closed:true,buttons:'#updateOfficeDlg-buttons'">
	 	<form id="updateOfficeFm" method="post">
	 		<table data-options="cellspacing:8px" >
	 			<tr>
	 				<td>用品名称：</td>
	 				<td><input id="officeName1"  class="easyui-textbox"  name="name"  type="text" required="required"  style="width:300px;height:30px;" readonly="readonly"/></td>
	 			</tr>  
	 			<tr>
	 				<td>库存数量：</td>
	 				<td><input class="easyui-textbox ; easyui-validatebox"  id="officeCount1" name="count"  required="required" style="width:300px;height:30px;"/></td>
	 			</tr>
	 			<tr>
	 				<td>用品单位：</td>
	 				<td><input id="officeUnit1"  class="easyui-textbox"  name="unit"  type="text" required="required" style="width:300px;height:30px;" readonly="readonly" /></td>
	 			</tr> 
	 		</table>
	 	</form>
	</div>
	
	<div id="updateOfficeDlg-buttons">
		<a href="javascript:updateOfficeDlg()" class="easyui-linkbutton"  data-options=" iconCls:'icon-ok'">提交</a>
		<a href="javascript:closeUpdateOfficeDlg()"  class="easyui-linkbutton"  data-options=" iconCls:'icon-cancel'">取消</a>
	</div>
</body>
</html>